package FactoryMethod.exp.idcard;

import FactoryMethod.exp.framework.Product;

import java.util.UUID;

/**
 * @author zsh
 * @Description
 * @create 2022-05-11 20:25
 */
public class IDCard extends Product {

    private String owner;
    private String id;

    IDCard(String owner){
        System.out.println("制作"+ owner+ "卡片");
        this.owner = owner;
        this.id = UUID.randomUUID().toString();
    }

    @Override
    public void use() {
        System.out.println("使用" + this.owner + "卡片,卡号为" + this.id);
    }

    public String getOwner() {
        return this.owner;
    }

    public String getId() {
        return id;
    }
}
